<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>查询火车票</title>
    <link rel="stylesheet" type="text/css" href="../../../css/aui.css" />
    <link rel="stylesheet" href="../../../css/index/train/train_demand.css"/>
    <link rel="stylesheet" href="../../../css/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="../../../css/index/hotel/date.css">
    <link rel="stylesheet" href="../../../css/common/select2.css">
    <link rel="stylesheet" href="../../../css/index/aircraft/index.css">
    <style>
    .select2 {
        width: 10.5rem!important;
        border: 0rem!important;
        font-size: 0.6rem!important;
        color:#73B8D7!important;
    }
    .select2 option{
        color:#73B8D7!important;
        height: 0.5rem!important;
    }

    .icon-huochexunhuanshijian {
        float: left;
        font-size: 1.9rem;
        color: #FFA85E;
        margin-top: -0.5rem;
    }
    </style>
</head>
<body>
  <div class="aui-content">
    <div class="plane_main">
        <div class="hi">HI，</div>
        <div class="plane_str">我们从未停止脚步。</div>
        <div class="search_plane">
            <!--地址选择-->
            <div class="one_way_address" style="overflow: auto;">
                <div class="one_way_start">
                    <input type="text" name="start" id="trainStart" value="" readonly onclick="trainAddressLeft()" placeholder="出发地" style="top:0.15rem;text-align:left;font-size:0.8rem;">
                </div>
                <div class="exchange">
                    <div class="line" style="margin-right:-0.2rem;">----</div>
                    <i class="iconfont icon-huochexunhuanshijian" onclick="exchange()"></i>
                    <div class="line" style="margin-left:-0.2rem;">----</div>
                </div>
                <div class="one_way_end">
                    <input type="text" name="end" id="trainEnd" value="" readonly onclick="trainAddressRight()" placeholder="目的地" style="top:0.15rem;text-align:right;font-size:0.8rem;">
                </div>
            </div>
            <!--时间选择-->
            <div class="one_way_time date-time">
                <!-- <i class="iconfont icon-calendar"></i> -->
                <span style="color:#666666;font-size:1rem;">1月5日</span>
                <e style="font-size:0.7rem;color:#666666;">今天</e>
                <span class="time entertime" style="display:none;"></span>
                <input type="text" class="input-enter none" disabled style="display:none;" />
                <input type="hidden" id="realyDate" value="">
            </div>
            <div style="width:100%;">
              <div style="float:left;width:1rem;height:1rem;border-radius:0 50% 50% 0;background:#6BC4EE;margin-left:-1.2rem;"></div>
              <div style="float:right;width:1rem;height:1rem;border-radius:50% 0 0 50%;background:#6BC4EE;margin-right:-1.2rem;"></div>
            </div>
        </div>
    </div>
    <div class="order_select">
      <div style="border-top: 1px dashed #6CB3D4;padding-top:1.2rem;">
      <div class="one_way_address orderN aui-hide">
        <!-- <div style="border-bottom:1px dashed #D2EBF5;overflow:auto;"> -->
          <div class="aui-list-item-label card_side u_ticket" style="width:30%;float:left;height:2.5rem;line-height:2.5rem;color:#2475AA;">
              <i class="iconfont icon-wendang" style="margin-left:0.2rem;"></i>
              <span style="font-weight:bold;font-size: 0.7rem">申请单号</span>
          </div>
          <div class="aui-list-item-input" id="order_travel" style="float: right;height:2.5rem;line-height:2.5rem;width:70%;">
              <select id="travel_id" class="select2">
                <option value="-1" selected="selected">请选择申请单号</option>
              </select>
          </div>
          <div style="clear:both;"></div>
          <div class='traves aui-hide'>
              <div class="one_way_address " style="border-bottom: 1px dashed #D2EBF5;border-top: 1px dashed #D2EBF5;overflow: auto;">
                  <div class="aui-list-item-label card_side u_ticket" style="width:33%;float:left;height:2.5rem;line-height:2.5rem;color:black;">
                      <i class="iconfont icon-riqi" style="font-size:1.1rem;color:#2475AA;float:left;"></i>
                      <div style="float:left;margin-top:0.05rem;font-size: 0.7rem;">出行日期</div>
                  </div>
                  <div class="aui-list-item-input start_dt" style="float: right;height:2.5rem;line-height:2.5rem;">

                  </div>
              </div>
              <div class="one_way_address " style="border-bottom: 1px dashed #D2EBF5;overflow: auto;">
                  <div class="aui-list-item-label card_side u_ticket" style="width:33%;float:left;height:2.5rem;line-height:2.5rem;color:black;">
                      <i class="iconfont icon-hangcheng3" style="font-size:0.75rem;color:#2475AA;float:left;margin: 0 0.25 rem 0 0.1rem;margin:0 0.15rem;"></i>
                      <div style="float:left;margin:0.05rem 0 0 0.08rem;font-size: 0.7rem;">行程</div>
                  </div>
                  <div class="aui-list-item-input city" style="float: right;height:2.5rem;line-height:2.5rem;font-size:0.6rem;">

                  </div>
              </div>
              <div class="one_way_address" id='travel_order' style="overflow: auto;">
                  <div class="aui-list-item-label card_side u_ticket" style="width:30%;float:left;height:2.5rem;line-height:2.5rem;color:black;">
                      <i class="iconfont icon-ren-copy" style="color:#2475AA;font-size:0.9rem;"></i>
                      <span style="font-size: 0.7rem;">出行人</span>
                  </div>
                  <div class="aui-list-item-input peoples" style="float: right;height:2.5rem;line-height:2.5rem;font-size:0.6rem;">

                  </div>
              </div>
              <!-- <div class='peoples'></div> -->
          </div>
      </div>
      </div>
      <div class="aui-btn aui-btn-block" onclick="search()" style="background:#FFA85E;margin-top:1rem;">查询</div>
      <div style="color:#D9D9D9;text-align:center;margin-top:0.5rem;"><i class="iconfont icon-dunpai" style="font-size:0.8rem;"></i><span style="font-size:0.7rem;">全程预订保障，全靠企管家</span></div>
    </div>
    <!-- <div style="border-bottom: 1px solid #DCDCDC;overflow: auto;padding:0.3rem 0 0.7rem 0;">
        <div class="aui-list-item-label card_side u_ticket" style="width:30%;float:left;color:black;font-weight:bold;">
            出行类型
        </div>
        <div class="aui-list-item-input" style="float: right;">
            <label style="color:#A9A9A9;"><input class="aui-radio order_radio" type="radio" name="order_type"  value="1"> 因公</label>
            <label style="margin-left:1rem;color:#A9A9A9; "><input class="aui-radio order_radio" checked type="radio" name="order_type" value="0"> 因私</label>
        </div>
    </div>
    <div class="one_way_address orderN aui-hide" style="border-bottom: 1px solid #DCDCDC;overflow: hidden;">
        <div class="aui-list-item-label card_side u_ticket" style="width:30%;float:left;height:2.5rem;line-height:2.5rem;color:black;font-weight:bold;">
            申请单号
        </div>
        <div class="aui-list-item-input" id="order_travel" style="float: right;height:2.5rem;line-height:2.5rem;">
            <select id="travel_id" class="select2">
              <option value="-1" selected="selected">请选择申请单号</option>

            </select>

        </div>
    </div> -->
    <!-- <div class='traves aui-hide'>
      <div class="one_way_address " style="border-bottom: 1px solid #DCDCDC;overflow: auto;">
         <div class="aui-list-item-label card_side u_ticket" style="width:30%;float:left;height:2.5rem;line-height:2.5rem;color:black;">
             出行日期
         </div>
         <div class="aui-list-item-input start_dt"  style="float: right;height:2.5rem;line-height:2.5rem;">

         </div>
      </div>
      <div class="one_way_address " style="border-bottom: 1px solid #DCDCDC;overflow: auto;">
         <div class="aui-list-item-label card_side u_ticket" style="width:30%;float:left;height:2.5rem;line-height:2.5rem;color:black;">
             行程
         </div>
         <div class="aui-list-item-input city"  style="float: right;height:2.5rem;line-height:2.5rem;">

         </div>
      </div>
      <div class="one_way_address" id='travel_order' style="border-bottom: 1px solid #DCDCDC;overflow: auto;">
         <div class="aui-list-item-label card_side u_ticket" style="width:30%;float:left;height:2.5rem;line-height:2.5rem;color:black;">
             出行人：
         </div>
      </div>
      <div class='peoples'></div>
    </div> -->
    <!-- <div class="select_address">
        <div class="address_left" onclick="trainAddressLeft()">
            <input class="train_start" type="text" readonly value="" placeholder="出发地" id="trainStart" >
        </div>
        <div class="replace">
            <i class="iconfont icon-jiaohuanqingqiu" style="color:#3CB0D6;font-size: 1.5rem;" id="commutation"></i>
        </div>
        <div class="address_right" onclick="trainAddressRight()">
            <input class="train_end" type="text" readonly value="" placeholder="目的地" id="trainEnd">
        </div>
    </div> -->
  </div>


<!-- <div class="select_date date-time" id="my-end">
    <i class="iconfont icon-calendar" style="color:#AAAAAA;font-size: 1.2rem;vertical-align: middle;"></i>
    <input type="text" placeholder="" value="" id="my-startDate" readonly="readonly" class="date_input">
    <input type="hidden" id="realyDate">
    <em class="date_show"></em>
</div>

<div class="aui-btn aui-btn-primary aui-btn-block demand" onclick="search()">查询</div> -->

</body>
<script src="../../../script/aui/api.js"></script>
<script src="../../../script/aui/aui-tab.js"></script>
<script src="../../../script/aui/aui-toast.js"></script>
<script src="../../../script/extend/jquery-3.3.1.min.js"></script>
<script src="../../../script/extend/select2.min.js"></script>
<script src="../../../script/extend/date.js"></script>
<script src="../../../script/widget/js-time.js"></script>
<script src="../../../script/common.js"></script>
<script src="../../../script/config.js"></script>
<script src="../../../service/index/train/trainSearch.js"></script>

<script type="text/javascript">
    var train;
    apiready = function() {
        api.parseTapmode();
        train = new trainSearch();
    };

    //交换地址
    function exchange() {
        var trainStart = $('#trainStart').val();
        var trainEnd = $('#trainEnd').val();
        $('#trainStart').val(trainEnd);
        $('#trainEnd').val(trainStart);
    }

    function trainAddressLeft(){
        let select_number = $('#travel_id').children('option:selected').text();
        if ($api.getStorage('order_type') == 1 && $api.getStorage('isApply') == 1 && select_number == '请选择申请单号') {
            alert('请先选择申请单号');
            return false;
        }
        cityList(0);
    }

    function trainAddressRight(){
        let select_number = $('#travel_id').children('option:selected').text();
        if ($api.getStorage('order_type') == 1 && $api.getStorage('isApply') == 1 && select_number == '请选择申请单号') {
            alert('请先选择申请单号');
            return false;
        }
        cityList(1);
    }

    function cityList(start_end) {
        api.openWin({
            name: 'addr',
            url: './addr_win.html',
            pageParam: {
                city_on: start_end
            }
        });
    }

    //查询
    function search() {
        train.trainSearchClick();
    }
</script>
</html>
